<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>检测变量是否为 NULL</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.is-null" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">is_null</h1>
    <p class="verinfo">(PHP 4 &gt;= 4.0.4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">is_null</span> &mdash; <span class="dc-title">
     检测变量是否为 <strong><code>NULL</code></strong>
    </span></p>

   </div>
   <div class="refsect1 unknown-unknown-seealsq" id="refsect1-function.is-null-unknown-unknown-seealsq">
    <h3 class="title">描述</h3>
     <div class="methodsynopsis dc-description">
      <span class="methodname"><strong>is_null</strong></span>
       ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$var</code></span>
      ) : <span class="type">bool</span></div>

    <p class="para rdfs-comment">
     如果 <code class="parameter">var</code> 是 <span class="type"><a href="language.types.null.html" class="type null">null</a></span> 则返回 <strong><code>TRUE</code></strong>，否则返回 <strong><code>FALSE</code></strong>。
    </p>
    <p class="para">
     查看 <a href="language.types.null.html#language.types.null.syntax" class="link"><strong><code>NULL</code></strong></a> 类型获知变量什么时候被认为是 <strong><code>NULL</code></strong>，而什么时候不是。
    </p>
    <p class="para">
     参见
     <a href="language.types.null.html#language.types.null.syntax" class="link"><strong><code>NULL</code></strong></a>、<span class="function"><a href="is_bool.html" class="function">is_bool()</a></span>、<span class="function"><a href="is_numeric.html" class="function">is_numeric()</a></span>、<span class="function"><a href="is_float.html" class="function">is_float()</a></span>、<span class="function"><a href="is_int.html" class="function">is_int()</a></span>、<span class="function"><a href="is_string.html" class="function">is_string()</a></span>、<span class="function"><a href="is_object.html" class="function">is_object()</a></span>、<span class="function"><a href="is_array.html" class="function">is_array()</a></span>、<span class="function"><a href="is_integer.html" class="function">is_integer()</a></span>
     和 <span class="function"><a href="is_real.html" class="function">is_real()</a></span>。
    </p>
   </div>

  </div></div></div></body></html>